/* ========== 通知样式 ========== */

/* 通知区域 */
.notification-area {
    position: relative;
    margin-left: auto;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* 通知图标 */
.notification-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.notification-icon i {
    font-size: 1.2rem;
    color: #fff;
}

/* 通知徽章 */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff5252;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 82, 82, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
    }
}

/* 通知面板 */
.notification-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    max-height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.25);
    z-index: 2000;
    overflow: hidden;
    display: none;
    animation: zoomIn 0.3s forwards;
}

.notification-panel.active {
    display: block;
}

/* 遮罩层 */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-overlay.active {
    display: block;
    opacity: 1;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 通知面板头部 */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.notification-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.notification-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* 通知面板选项卡 */
.notification-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    background-color: #f9f9f9;
}

.notification-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.2s ease;
}

.notification-tabs .tab:hover {
    color: #333;
    background-color: #f0f0f0;
}

.notification-tabs .tab.active {
    color: #4c84ff;
    font-weight: 500;
    border-bottom: 2px solid #4c84ff;
}

/* 通知列表 */
.notification-list {
    max-height: 330px;
    overflow-y: auto;
    padding: 0;
}

.notification-list::-webkit-scrollbar {
    width: 4px;
}

.notification-list::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 4px;
}

/* 加载和错误状态 */
.loading-notification, 
.error-notification, 
.empty-notification {
    padding: 25px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.loading-notification i {
    margin-right: 8px;
    color: #4c84ff;
    font-size: 1.1rem;
}

.error-notification {
    color: #e74c3c;
    padding: 30px 20px;
}

/* 通知项目 */
.notification-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background-color: #f9f9f9;
}

.notification-item.unread {
    background-color: #f0f7ff;
}

.notification-item.unread:hover {
    background-color: #e8f3ff;
}

.notification-item.priority-high {
    background-color: #fff8f8;
    border-left: 3px solid #ff5252;
}

.notification-item.priority-high:hover {
    background-color: #fff0f0;
}

/* 通知头像 */
.notification-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-indicator.online {
    background-color: #4caf50;
}

.status-indicator.offline {
    background-color: #9e9e9e;
}

.system-avatar {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.system-avatar i {
    font-size: 20px;
    color: #666;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content .notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 5px 0;
    border-bottom: none;
}

.notification-title {
    font-weight: 500;
    color: #333;
    margin-right: 5px;
}

.notification-time {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}

.notification-content p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-content .request-note {
    font-style: italic;
    color: #777;
    background-color: #f9f9f9;
    padding: 5px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.notification-content .notification-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    color: #444;
}

.btn-primary {
    background-color: #4c84ff;
    color: white;
}

.btn-primary:hover {
    background-color: #3b74e6;
}

.notification-type {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-type i {
    font-size: 12px;
    color: #666;
}

.notification-footer {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.btn-text {
    background: none;
    border: none;
    color: #4c84ff;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.btn-text:hover {
    background-color: #f0f7ff;
}

.btn-block {
    width: 100%;
    display: block;
}

/* 好友请求特定样式 */
.friend-request .notification-actions {
    justify-content: flex-start;
}

.accept-friend {
    background-color: #4caf50;
    color: white;
}

.accept-friend:hover {
    background-color: #43a047;
}

.reject-friend {
    background-color: #f0f0f0;
    color: #666;
}

.reject-friend:hover {
    background-color: #e0e0e0;
}

/* Toast 消息样式 */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background-color: #323232;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    min-width: 250px;
    max-width: 350px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: #4caf50;
    border-left: 4px solid #2e7d32;
}

.toast.error {
    background-color: #f44336;
    border-left: 4px solid #c62828;
}

.toast.warning {
    background-color: #ff9800;
    border-left: 4px solid #ef6c00;
}

.toast.info {
    background-color: #2196f3;
    border-left: 4px solid #1565c0;
}

.toast-content {
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .notification-panel {
        width: 90%;
        max-width: 400px;
        max-height: 500px;
    }
    
    .notification-avatar {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .notification-panel {
        width: 95%;
        max-height: 450px;
    }
    
    .notification-content .notification-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-sm {
        width: 100%;
    }
}

/* Notifications CSS */

/* Error Toast */
.error-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #f44336;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    max-width: 300px;
    animation: fadeIn 0.3s ease-in-out;
}

/* Success Toast */
.success-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    max-width: 300px;
    animation: fadeIn 0.3s ease-in-out;
}

/* Info Toast */
.info-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2196F3;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    max-width: 300px;
    animation: fadeIn 0.3s ease-in-out;
}

/* Toast animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Connection status indicator */
.connection-status {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 10px;
}

.connection-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.connection-status.connected {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.connection-status.connected::before {
    background-color: #4CAF50;
}

.connection-status.disconnected {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.connection-status.disconnected::before {
    background-color: #f44336;
}

.connection-status.connecting {
    background-color: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.connection-status.connecting::before {
    background-color: #FF9800;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

/* Loading indicators */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.loading-indicator i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #2196F3;
}

/* Media upload preview styles */
.preview-item {
    position: relative;
    margin: 5px;
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.preview-item img,
.preview-item video {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.preview-item.loading {
    background-color: rgba(0, 0, 0, 0.05);
    color: #666;
    flex-direction: column;
    font-size: 12px;
}

.preview-item.loading i {
    font-size: 24px;
    margin-bottom: 5px;
}

.preview-item.error {
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336;
    flex-direction: column;
    font-size: 12px;
}

.preview-item.error i {
    font-size: 24px;
    margin-bottom: 5px;
}

.remove-media-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: background-color 0.2s;
}

.remove-media-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
} 